/**
 * This is a generated class and is not intended for modification.  To customize behavior
 * of this value object you may modify the generated sub-class of this class - Mensaje.as.
 */

package valueObjects
{
import com.adobe.fiber.services.IFiberManagingService;
import com.adobe.fiber.valueobjects.IValueObject;
import flash.events.EventDispatcher;
import mx.collections.ArrayCollection;
import mx.events.PropertyChangeEvent;

import flash.net.registerClassAlias;
import flash.net.getClassByAlias;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;

use namespace model_internal;

[ExcludeClass]
public class _Super_Mensaje extends flash.events.EventDispatcher implements com.adobe.fiber.valueobjects.IValueObject
{
    model_internal static function initRemoteClassAliasSingle(cz:Class) : void
    {
    }

    model_internal static function initRemoteClassAliasAllRelated() : void
    {
    }

    model_internal var _dminternal_model : _MensajeEntityMetadata;
    model_internal var _changedObjects:mx.collections.ArrayCollection = new ArrayCollection();

    public function getChangedObjects() : Array
    {
        _changedObjects.addItemAt(this,0);
        return _changedObjects.source;
    }

    public function clearChangedObjects() : void
    {
        _changedObjects.removeAll();
    }

    /**
     * properties
     */
    private var _internal_id : int;
    private var _internal_estado : String;
    private var _internal_fechaEmitir : Date;
    private var _internal_sfechaEmitir : String;
    private var _internal_mensaje : String;
    private var _internal_ciclico : Boolean;
    private var _internal_domingo : Boolean;
    private var _internal_lunes : Boolean;
    private var _internal_martes : Boolean;
    private var _internal_miercoles : Boolean;
    private var _internal_jueves : Boolean;
    private var _internal_viernes : Boolean;
    private var _internal_sabado : Boolean;
    private var _internal_intervalo : Boolean;
    private var _internal_intervaloHoras : int;
    private var _internal_intervaloMinutos : int;
    private var _internal_vecesRepetir : int;
    private var _internal_fechaTermino : Date;
    private var _internal_sfechaTermino : String;
    private var _internal_VCHUSUARIOCREACION : String;
    private var _internal_DTMFECHACREACION : Date;
    private var _internal_VCHUSUARIOMODIFICACION : String;
    private var _internal_DTMFECHAMODIFICACION : Date;
    private var _internal_diasEmision : String;

    private static var emptyArray:Array = new Array();


    /**
     * derived property cache initialization
     */
    model_internal var _cacheInitialized_isValid:Boolean = false;

    model_internal var _changeWatcherArray:Array = new Array();

    public function _Super_Mensaje()
    {
        _model = new _MensajeEntityMetadata(this);

        // Bind to own data or source properties for cache invalidation triggering

    }

    /**
     * data/source property getters
     */

    [Bindable(event="propertyChange")]
    public function get id() : int
    {
        return _internal_id;
    }

    [Bindable(event="propertyChange")]
    public function get estado() : String
    {
        return _internal_estado;
    }

    [Bindable(event="propertyChange")]
    public function get fechaEmitir() : Date
    {
        return _internal_fechaEmitir;
    }

    [Bindable(event="propertyChange")]
    public function get sfechaEmitir() : String
    {
        return _internal_sfechaEmitir;
    }

    [Bindable(event="propertyChange")]
    public function get mensaje() : String
    {
        return _internal_mensaje;
    }

    [Bindable(event="propertyChange")]
    public function get ciclico() : Boolean
    {
        return _internal_ciclico;
    }

    [Bindable(event="propertyChange")]
    public function get domingo() : Boolean
    {
        return _internal_domingo;
    }

    [Bindable(event="propertyChange")]
    public function get lunes() : Boolean
    {
        return _internal_lunes;
    }

    [Bindable(event="propertyChange")]
    public function get martes() : Boolean
    {
        return _internal_martes;
    }

    [Bindable(event="propertyChange")]
    public function get miercoles() : Boolean
    {
        return _internal_miercoles;
    }

    [Bindable(event="propertyChange")]
    public function get jueves() : Boolean
    {
        return _internal_jueves;
    }

    [Bindable(event="propertyChange")]
    public function get viernes() : Boolean
    {
        return _internal_viernes;
    }

    [Bindable(event="propertyChange")]
    public function get sabado() : Boolean
    {
        return _internal_sabado;
    }

    [Bindable(event="propertyChange")]
    public function get intervalo() : Boolean
    {
        return _internal_intervalo;
    }

    [Bindable(event="propertyChange")]
    public function get intervaloHoras() : int
    {
        return _internal_intervaloHoras;
    }

    [Bindable(event="propertyChange")]
    public function get intervaloMinutos() : int
    {
        return _internal_intervaloMinutos;
    }

    [Bindable(event="propertyChange")]
    public function get vecesRepetir() : int
    {
        return _internal_vecesRepetir;
    }

    [Bindable(event="propertyChange")]
    public function get fechaTermino() : Date
    {
        return _internal_fechaTermino;
    }

    [Bindable(event="propertyChange")]
    public function get sfechaTermino() : String
    {
        return _internal_sfechaTermino;
    }

    [Bindable(event="propertyChange")]
    public function get VCHUSUARIOCREACION() : String
    {
        return _internal_VCHUSUARIOCREACION;
    }

    [Bindable(event="propertyChange")]
    public function get DTMFECHACREACION() : Date
    {
        return _internal_DTMFECHACREACION;
    }

    [Bindable(event="propertyChange")]
    public function get VCHUSUARIOMODIFICACION() : String
    {
        return _internal_VCHUSUARIOMODIFICACION;
    }

    [Bindable(event="propertyChange")]
    public function get DTMFECHAMODIFICACION() : Date
    {
        return _internal_DTMFECHAMODIFICACION;
    }

    [Bindable(event="propertyChange")]
    public function get diasEmision() : String
    {
        return _internal_diasEmision;
    }

    public function clearAssociations() : void
    {
    }

    /**
     * data/source property setters
     */

    public function set id(value:int) : void
    {
        var oldValue:int = _internal_id;
        if (oldValue !== value)
        {
            _internal_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "id", oldValue, _internal_id));
        }
    }

    public function set estado(value:String) : void
    {
        var oldValue:String = _internal_estado;
        if (oldValue !== value)
        {
            _internal_estado = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "estado", oldValue, _internal_estado));
        }
    }

    public function set fechaEmitir(value:Date) : void
    {
        var oldValue:Date = _internal_fechaEmitir;
        if (oldValue !== value)
        {
            _internal_fechaEmitir = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fechaEmitir", oldValue, _internal_fechaEmitir));
        }
    }

    public function set sfechaEmitir(value:String) : void
    {
        var oldValue:String = _internal_sfechaEmitir;
        if (oldValue !== value)
        {
            _internal_sfechaEmitir = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sfechaEmitir", oldValue, _internal_sfechaEmitir));
        }
    }

    public function set mensaje(value:String) : void
    {
        var oldValue:String = _internal_mensaje;
        if (oldValue !== value)
        {
            _internal_mensaje = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "mensaje", oldValue, _internal_mensaje));
        }
    }

    public function set ciclico(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_ciclico;
        if (oldValue !== value)
        {
            _internal_ciclico = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "ciclico", oldValue, _internal_ciclico));
        }
    }

    public function set domingo(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_domingo;
        if (oldValue !== value)
        {
            _internal_domingo = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "domingo", oldValue, _internal_domingo));
        }
    }

    public function set lunes(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_lunes;
        if (oldValue !== value)
        {
            _internal_lunes = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "lunes", oldValue, _internal_lunes));
        }
    }

    public function set martes(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_martes;
        if (oldValue !== value)
        {
            _internal_martes = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "martes", oldValue, _internal_martes));
        }
    }

    public function set miercoles(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_miercoles;
        if (oldValue !== value)
        {
            _internal_miercoles = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "miercoles", oldValue, _internal_miercoles));
        }
    }

    public function set jueves(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_jueves;
        if (oldValue !== value)
        {
            _internal_jueves = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "jueves", oldValue, _internal_jueves));
        }
    }

    public function set viernes(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_viernes;
        if (oldValue !== value)
        {
            _internal_viernes = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "viernes", oldValue, _internal_viernes));
        }
    }

    public function set sabado(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_sabado;
        if (oldValue !== value)
        {
            _internal_sabado = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sabado", oldValue, _internal_sabado));
        }
    }

    public function set intervalo(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_intervalo;
        if (oldValue !== value)
        {
            _internal_intervalo = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "intervalo", oldValue, _internal_intervalo));
        }
    }

    public function set intervaloHoras(value:int) : void
    {
        var oldValue:int = _internal_intervaloHoras;
        if (oldValue !== value)
        {
            _internal_intervaloHoras = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "intervaloHoras", oldValue, _internal_intervaloHoras));
        }
    }

    public function set intervaloMinutos(value:int) : void
    {
        var oldValue:int = _internal_intervaloMinutos;
        if (oldValue !== value)
        {
            _internal_intervaloMinutos = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "intervaloMinutos", oldValue, _internal_intervaloMinutos));
        }
    }

    public function set vecesRepetir(value:int) : void
    {
        var oldValue:int = _internal_vecesRepetir;
        if (oldValue !== value)
        {
            _internal_vecesRepetir = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "vecesRepetir", oldValue, _internal_vecesRepetir));
        }
    }

    public function set fechaTermino(value:Date) : void
    {
        var oldValue:Date = _internal_fechaTermino;
        if (oldValue !== value)
        {
            _internal_fechaTermino = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fechaTermino", oldValue, _internal_fechaTermino));
        }
    }

    public function set sfechaTermino(value:String) : void
    {
        var oldValue:String = _internal_sfechaTermino;
        if (oldValue !== value)
        {
            _internal_sfechaTermino = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sfechaTermino", oldValue, _internal_sfechaTermino));
        }
    }

    public function set VCHUSUARIOCREACION(value:String) : void
    {
        var oldValue:String = _internal_VCHUSUARIOCREACION;
        if (oldValue !== value)
        {
            _internal_VCHUSUARIOCREACION = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "VCHUSUARIOCREACION", oldValue, _internal_VCHUSUARIOCREACION));
        }
    }

    public function set DTMFECHACREACION(value:Date) : void
    {
        var oldValue:Date = _internal_DTMFECHACREACION;
        if (oldValue !== value)
        {
            _internal_DTMFECHACREACION = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "DTMFECHACREACION", oldValue, _internal_DTMFECHACREACION));
        }
    }

    public function set VCHUSUARIOMODIFICACION(value:String) : void
    {
        var oldValue:String = _internal_VCHUSUARIOMODIFICACION;
        if (oldValue !== value)
        {
            _internal_VCHUSUARIOMODIFICACION = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "VCHUSUARIOMODIFICACION", oldValue, _internal_VCHUSUARIOMODIFICACION));
        }
    }

    public function set DTMFECHAMODIFICACION(value:Date) : void
    {
        var oldValue:Date = _internal_DTMFECHAMODIFICACION;
        if (oldValue !== value)
        {
            _internal_DTMFECHAMODIFICACION = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "DTMFECHAMODIFICACION", oldValue, _internal_DTMFECHAMODIFICACION));
        }
    }

    public function set diasEmision(value:String) : void
    {
        var oldValue:String = _internal_diasEmision;
        if (oldValue !== value)
        {
            _internal_diasEmision = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "diasEmision", oldValue, _internal_diasEmision));
        }
    }

    /**
     * Data/source property setter listeners
     *
     * Each data property whose value affects other properties or the validity of the entity
     * needs to invalidate all previously calculated artifacts. These include:
     *  - any derived properties or constraints that reference the given data property.
     *  - any availability guards (variant expressions) that reference the given data property.
     *  - any style validations, message tokens or guards that reference the given data property.
     *  - the validity of the property (and the containing entity) if the given data property has a length restriction.
     *  - the validity of the property (and the containing entity) if the given data property is required.
     */


    /**
     * valid related derived properties
     */
    model_internal var _isValid : Boolean;
    model_internal var _invalidConstraints:Array = new Array();
    model_internal var _validationFailureMessages:Array = new Array();

    /**
     * derived property calculators
     */

    /**
     * isValid calculator
     */
    model_internal function calculateIsValid():Boolean
    {
        var violatedConsts:Array = new Array();
        var validationFailureMessages:Array = new Array();

        var propertyValidity:Boolean = true;

        model_internal::_cacheInitialized_isValid = true;
        model_internal::invalidConstraints_der = violatedConsts;
        model_internal::validationFailureMessages_der = validationFailureMessages;
        return violatedConsts.length == 0 && propertyValidity;
    }

    /**
     * derived property setters
     */

    model_internal function set isValid_der(value:Boolean) : void
    {
        var oldValue:Boolean = model_internal::_isValid;
        if (oldValue !== value)
        {
            model_internal::_isValid = value;
            _model.model_internal::fireChangeEvent("isValid", oldValue, model_internal::_isValid);
        }
    }

    /**
     * derived property getters
     */

    [Transient]
    [Bindable(event="propertyChange")]
    public function get _model() : _MensajeEntityMetadata
    {
        return model_internal::_dminternal_model;
    }

    public function set _model(value : _MensajeEntityMetadata) : void
    {
        var oldValue : _MensajeEntityMetadata = model_internal::_dminternal_model;
        if (oldValue !== value)
        {
            model_internal::_dminternal_model = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "_model", oldValue, model_internal::_dminternal_model));
        }
    }

    /**
     * methods
     */


    /**
     *  services
     */
    private var _managingService:com.adobe.fiber.services.IFiberManagingService;

    public function set managingService(managingService:com.adobe.fiber.services.IFiberManagingService):void
    {
        _managingService = managingService;
    }

    model_internal function set invalidConstraints_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invalidConstraints;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_invalidConstraints = value;
            _model.model_internal::fireChangeEvent("invalidConstraints", oldValue, model_internal::_invalidConstraints);
        }
    }

    model_internal function set validationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_validationFailureMessages;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_validationFailureMessages = value;
            _model.model_internal::fireChangeEvent("validationFailureMessages", oldValue, model_internal::_validationFailureMessages);
        }
    }


}

}
